package com.java.multipledatasource.spring.entity;

/**
 * @author huxb
 * @date 2020/11/14 0014 下午 9:45
 * @Desciption
 */
public class Student  implements Cloneable{
    private String name;

    private int age;

    private Clazz clazz;

    public Student() {
    }

    public Student(String name, int age, Clazz clazz) {
        this.name = name;
        this.age = age;
        this.clazz = clazz;
    }


    @Override
    public Object clone() throws CloneNotSupportedException {
        Student s = (Student) super.clone();
        s.setClazz(this.clazz.clone());
        return s;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Clazz getClazz() {
        return clazz;
    }

    public void setClazz(Clazz clazz) {
        this.clazz = clazz;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", clazz=" + clazz +
                '}';
    }
}
